//
//  NewsTableViewCell.m
//  ShangAPP
//
//  Created by ---☆渴望☆--- on 16/3/12.
//  Copyright © 2016年 wangdao. All rights reserved.
//

#import "NewsTableViewCell.h"
#import "MyTools.h"


@implementation NewsTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self viewCreate];
    }
    return self;
}

-(void)viewCreate
{
    _headimage =[[UIImageView alloc]initWithFrame:CGRectMake(10, 8, 40, 40)];
    [self addSubview:_headimage];
    
    UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(60, 10, 3, 16)];
    lab.backgroundColor = UIColorFromRGB(0xFFD700);
    lab.layer.cornerRadius = 2;
    lab.layer.masksToBounds = YES;

    [self addSubview:lab];
    
    _titleLab =[[UILabel alloc]initWithFrame:CGRectMake(65, 8, WIDTH-80, 20)];
    _titleLab.textColor =UIColorFromRGB(0x333333);
    _titleLab.font =[UIFont systemFontOfSize:14];
    [self addSubview:_titleLab];
    
    _contentLab =[[UILabel alloc]initWithFrame:CGRectMake(65, 30, WIDTH-80, 50)];
    _contentLab.textColor =UIColorFromRGB(0x333333);
    _contentLab.font =[UIFont systemFontOfSize:14];
    [self addSubview:_contentLab];
    
    _viewLine =[[UIView alloc]initWithFrame:CGRectMake(0, 79, WIDTH, 1)];
    _viewLine.backgroundColor =UIColorFromRGB(0xEBEBEB);
    [self addSubview:_viewLine];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
